<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Medium plus rem</title>
    <style>
        * {
            margin:0;
            padding: 0;
        }
        /* 注意：主屏幕的字体不能在外面写死。
        html {
            font-size: 100px; 
        }  */

        /* 从小到大的顺序 */
        @media screen and (min-width: 320px) {
            html {
                font-size: 50px;
            }
        }

        @media screen and (min-width: 640px) {
            html {
                font-size: 100px
            }
        }

        .top {
            height: 1rem;
            font-size: .5rem;
            background-color: green;
            color: #fff;
            text-align: center;
            line-height: 1rem;
        }
    </style>
</head>
<body>
    <!-- /*shopping trolley 购物车*/ -->
    <div class="top">Shopping Trolley</div>
</body>
</html>